package com.lancoo.klgcourseware.entity;

import android.text.TextUtils;

import java.util.List;

/**
 * Created by pengmi on 2018/11/7.
 * Description:句法知识点素材数据模型
 */

public class SyntaxKnowledgeModel {

    //主题名称主题名称
    private String ThemeName;
    //释义用法清单
    private List<ExpressionAndUsageModel> UsageList;
    //经典句
    private String ClassicSen;
    //经典例句翻译
    private String ClassicTran;
    //经典例句音频路径
    private String ClassicVoice;

    public String getThemeName() {
        return ThemeName;
    }

    public void setThemeName(String themeName) {
        ThemeName = themeName;
    }

    public List<ExpressionAndUsageModel> getUsageList() {
        return UsageList;
    }

    public void setUsageList(List<ExpressionAndUsageModel> usageList) {
        UsageList = usageList;
    }

    public String getClassicSen() {
        return ClassicSen;
    }

    public void setClassicSen(String classicSen) {
        ClassicSen = classicSen;
    }

    public String getClassicTran() {
        return ClassicTran;
    }

    public void setClassicTran(String classicTran) {
        ClassicTran = classicTran;
    }

    public String getClassicVoice() {
        if(!TextUtils.isEmpty(ClassicVoice)){
            ClassicVoice= ClassicVoice.replace("//////","/").replace("/////","/").replace("////","/").replace("///","/").replace("//","/");
            if(TextUtils.equals("/",ClassicVoice.substring(0,1))){
                ClassicVoice=ClassicVoice.substring(1);
            }
        }
        return ClassicVoice;
    }

    public void setClassicVoice(String classicVoice) {
        ClassicVoice = classicVoice;
    }
}
